@extends('Admin.base')
@section('style')
    <style>
        .layui-row .layui-inline{margin-right:0px !important;}
    </style>
@endsection
@section('content')
    <div class="layui-card">
        <div class="layui-card-body">
            <table id="LAY-exportLogs-table" lay-filter="LAY-exportLogs-table"></table>
            <script type="text/html" id="table-exportLogs-toolbar">
                @{{#  if(d.status == 2){ }}
                <a class="layui-btn layui-btn-xs" target="_blank" href="{{url('admin/exportLogs/download')}}/@{{d.id}}" >
                    下载
                </a>
                @{{#  } }}
            </script>
        </div>
    </div>
@endsection

@section('script')
    <script src="/js/ajax.js"></script>
    <script>
        layui.use(['form', 'table'], function(){
            var $ = layui.$
                ,form = layui.form
                ,table = layui.table;

            //管理员管理
            table.render({
                elem: '#LAY-exportLogs-table'
                ,url: "{{url('/admin/exportLogs/table')}}"
                ,method: "post"
                ,page: true //开启分页
                ,limit:10
                ,cols: [[
                    {field: 'filename', title: '文件名称'}
                    ,{field: 'status_txt', title: '状态', width:200}
                    ,{field: 'download', title:'下载量', width:200}
                    ,{field: 'completed_at', title: '创建时间', width: 200}
                    ,{title: '操作', width:100, align: 'right', toolbar: '#table-exportLogs-toolbar'}
                ]]
            });
        });
    </script>

@endsection